package com.example.game_community.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Comment {
    private Long id;
    private Long postId;
    private String content;
    private LocalDateTime commentTime;
    private Integer likeCount;
    private Long userId;
    private Long parentId;

    @TableField(exist = false)
    private User user; // 评论的用户信息

    @TableField(exist = false)
    private List<Comment> children; // 子评论列表，每个子评论也包含 user 信息
}
